package com.heaven.back.utils;

import java.util.Random;

/**
 * The type Random number generator.
 */
public class RandomNumberGenerator {
    /**
     * Gets random number in range.
     *
     * @param min the min
     * @param max the max
     * @return the random number in range
     */
    public static int getRandomNumberInRange(int min, int max) {
        Random rand = new Random();
        return rand.nextInt((max - min) + 1) + min; // 生成介于min和max之间的随机数
    }
}
